
$(document).ready(function() {
	var curWwwPath=window.document.location.href; 
	var pathName=window.document.location.pathname; 
	var pos=curWwwPath.indexOf(pathName); 
	var locationPath =curWwwPath.substring(0,pos); 
	//用户名
	$("input#username").blur(function() {
		var username = $("input#username").val();
		$.ajax({
			url : locationPath + '/index.php/Home/User/checkr_agent_egister',
			type : "post",
			data : {
				'username' : username
			},
			error : function() {
				alert(id_netword_error);
			},
			success : function(data) {
				if (data == 2) {
				} else {
					alert("账号不存在!");
				}
			}
		});
	});
	

});	


function Forget() {
	var nameStr = document.getElementById("username").value;
	if (nameStr == '') {
		alert("用户名不能为空！");
		document.getElementById("username").focus();
		return false;
	}
	
	var phone = document.getElementById("phone").value;
	if (phone == '') {
		alert("手机号不能为空！");
		document.getElementById("phone").focus();
		return false;
	}
	
	var checkcode = document.getElementById("code").value;
	if (checkcode == '') {
		alert("验证码不能为空！");
		document.getElementById("code").focus();
		return false;
	}
	
	return true;
}




